﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DNASequencing.core.data.simple;

namespace DNASequencing.core.data.backwardComplex
{
    /// <summary>
    /// Data Tree with holding followers in every oligonucleotide and 
    /// with backward searching.
    /// </summary>
    class BackwardComplexDT : ADataTree
    {
        /// <summary>
        /// Creates new Backward, Complex Data Tree.
        /// </summary>
        /// <param name="inputData">List of oligonucleotides as Strings.</param>
        public BackwardComplexDT(List<String> inputData)
        {
            _nRoot = new Node();
            _lsAll = new List<AOligonucleotide>();

            foreach (String sequence in inputData)
            {
                Oligonucleotide temp = new Oligonucleotide(sequence);
                _lsAll.Add(temp);
            }

            foreach (Oligonucleotide o in all)
            {
                o.updateNext(_lsAll);

                BackwardOligonucleotide temp = new BackwardOligonucleotide(o);
                _nRoot.add(temp);
            }
        }
    }
}
